package com.huika.renrench.control.my.adapter;

import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.huika.renrench.R;
import com.huika.renrench.control.common.base.BaseAda;
import com.huika.renrench.control.my.activity.UserInviteActivity;
import com.huika.renrench.support.bean.ColleCtcarveBean;

/**
 * @author yangyuan
 * @date：2015年6月3日
 * @describe:收藏创业适配器
 */
public class ColleCtcarveAdapter extends BaseAda<ColleCtcarveBean>  {

	public ColleCtcarveAdapter(UserInviteActivity context) {
		super(context);
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ViewHolder vh = null;
		if (convertView == null) {
			convertView = mInflater.inflate(R.layout.item_colle_ctcarve, parent, false);
			vh = new ViewHolder(convertView);
			convertView.setTag(vh);
		}else{
			vh = (ViewHolder) convertView.getTag();
		}
		ColleCtcarveBean bean = group.get(position);
		vh.text_Invite_name.setText(bean.getName());
		vh.text_Invite_time.setText(bean.getTimeStr());
		if (position == 0) {
			vh.zhanwei.setVisibility(View.VISIBLE);
		}else {
			vh.zhanwei.setVisibility(View.GONE);
		}
		return convertView;
	}
	
	class ViewHolder{
		public TextView zhanwei;
		public TextView text_Invite_name;
		public TextView text_Invite_time;
		
		public ViewHolder(View convertView) {
			zhanwei = (TextView) convertView.findViewById(R.id.zhanwei);
			text_Invite_name = (TextView) convertView.findViewById(R.id.text_invite_name);
			text_Invite_time = (TextView) convertView.findViewById(R.id.text_invite_time);
	}
}




}
